Add Agent Playbook section for automated updates - #26
Conversation
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull Request Overview
The PR introduces a comprehensive 'Agent Playbook' to README.md, aligning with the project's goal to facilitate automated updates. Codacy analysis indicates the changes are up to standards with no new quality issues. However, the documentation contains a path inconsistency in the testing instructions; the paths used in the validation steps do not match the project structure defined earlier in the document. This discrepancy should be corrected to ensure that both developers and AI agents can successfully execute the local validation commands without manual troubleshooting.
Test suggestions
- Found: Verify README includes specific instructions for bumping the SQLint version in patterns.json.
- Found: Verify README provides the correct sbt commands for local Docker builds and formatting checks.
- Found: Verify documentation explains how to use codacy-plugins-test for local validation.
- Found: Verify instructions for monitoring PR checks via the GitHub CLI or UI are included.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| 2. There is no docs-generation step to run — `patterns.json` and `description.json` are hand-maintained and there's only one pattern, so no regeneration is needed. Just sanity-check that `description.json`'s `allIssues` entry still matches reality. | ||
| 3. **Format/compile check:** `sbt "scalafmtCheckAll; scalafmtSbtCheck"` (matches what CI runs in `publish_docker_local`). Run `sbt scalafmt` first if it fails. | ||
| 4. **Build the Docker image locally**: `sbt docker:publishLocal` (produces `codacy-sqlint:1.0` per `version in Docker`, or override the name/version to match CI: `sbt 'set name := "codacy-sqlint"' 'set Docker / version := "latest"' docker:publishLocal`). | ||
| 5. **Run `codacy-plugins-test` locally** before pushing — clone https://github.com/codacy/codacy-plugins-test and run it against your local image tag, exercising both the single-pattern test (`docs/tests/test1.sql`) and the multiple-tests fixture (`docs/multiple-tests/with-config-file`). |
There was a problem hiding this comment.
🟡 MEDIUM RISK
Suggestion: The test fixture paths in step 5 (docs/tests/...) are inconsistent with the source paths established in section 1 (src/main/resources/docs/...). Using the full source path ensures the test runner can locate the files. Additionally, for an AI agent, using the official Docker image for codacy-plugins-test is more reliable than cloning the repository. Try running the following prompt in your coding agent: > Update the paths in step 5 of the README to use 'src/main/resources/docs/' instead of 'docs/' and provide a concrete 'docker run' command for 'codacy/codacy-plugins-test:latest' using the 'codacy-sqlint:latest' image.
Summary
Test plan